<?php
class categoryModel extends CModel{
    protected $table  = 'category';
    protected $prikey = 'cid';
    protected $_name  = 'category';
    protected $alias  = 'c';
    protected $_relation = array(
        // 一个分类拥有多篇文章 
        'has_news' => array(
            'model'       => 'address',
            'type'        => HAS_MANY,
            'foreign_key' => 'cid',
            'dependent'   => true
        ),
    );
    
    public function get_list()
    {
    	//$findargs = array('fields'=>array('this.id','this.subject','cat.name'));
        //return $this->find($findargs);
    }
}
?>